package com.skyworth.util.imageloader;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.widget.ImageView;

/**
 * Created by luwei on 15-12-28.
 */
public class LoaderData{
    private int width = 0;

    public float getLeftTopCorner() {
        return leftTopCorner;
    }

    public void setLeftTopCorner(float leftTopCorner) {
        this.leftTopCorner = leftTopCorner;
    }

    public float getLeftBottomCorner() {
        return leftBottomCorner;
    }

    public void setLeftBottomCorner(float leftBottomCorner) {
        this.leftBottomCorner = leftBottomCorner;
    }

    public float getRightTopCorner() {
        return rightTopCorner;
    }

    public void setRightTopCorner(float rightTopCorner) {
        this.rightTopCorner = rightTopCorner;
    }

    public float getRightBottomCorner() {
        return rightBottomCorner;
    }

    public void setRightBottomCorner(float rightBottomCorner) {
        this.rightBottomCorner = rightBottomCorner;
    }

    private int height = 0;

    private float leftTopCorner = 0;

    private float leftBottomCorner = 0;

    private float rightTopCorner = 0;

    private float rightBottomCorner = 0;

    private CircleParams circleParams = null;

    public void setCircleParams(CircleParams circleParams) {
        this.circleParams = circleParams;
    }

    public CircleParams getCircleParams() {

        return circleParams;
    }

    public void setCallback(FinalCallback callback) {
        this.callback = callback;
    }

    private Uri uri = null;

    public int getImageId() {
        return imageId;
    }

    public void setImageId(int imageId) {
        this.imageId = imageId;
    }

    private int imageId = 0;

    private boolean showAnimation = true;

    public boolean isShowAnimation() {
        return showAnimation;
    }

    public void setShowAnimation(boolean showAnimation) {

        this.showAnimation = showAnimation;
    }

    private FinalCallback callback = null;

    public FinalCallback getCallback() {
        return callback;
    }

    public void setWrapContent(boolean wrapContent) {
        isWrapContent = wrapContent;
    }

    public boolean isWrapContent() {
        return isWrapContent;
    }

    private boolean isWrapContent = false;
    private ImageView.ScaleType scaleType = null;

    public ImageView.ScaleType getScaleType() {
        return scaleType;
    }

    public void setScaleType(ImageView.ScaleType scaleType) {
        this.scaleType = scaleType;
    }

    public LoaderData(LoaderData data){
        setWidth(data.getWidth());
        setHeight(data.getHeight());
        setUri(data.getUri());
        setContext(data.getContext());
        setSmall(data.getSmall());
        setTransform(data.getTransform());
        setScaleType(data.getScaleType());
        setPlaceResource(data.getPlaceResource());
        setPlaceDrawable(data.getPlaceDrawable());
        setWrapContent(data.isWrapContent());
        setCallback(data.getCallback());
        setLeftTopCorner(data.getLeftTopCorner());
        setLeftBottomCorner(data.getLeftBottomCorner());
        setRightTopCorner(data.getRightTopCorner());
        setRightBottomCorner(data.getRightBottomCorner());
        setImageId(data.getImageId());
        setShowAnimation(data.isShowAnimation());
        setCircleParams(data.getCircleParams());
    }

    public LoaderData(){};

    public Uri getUri() {
        return uri;
    }

    public void setUri(Uri uri) {
        this.uri = uri;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public Context getContext() {
        return context;
    }

    public void setContext(Context context) {
        this.context = context;
    }

    public Transform getTransform() {
        return transform;
    }

    public void setTransform(Transform transform) {
        this.transform = transform;
    }

    public Uri getSmall() {
        return small;
    }

    public void setSmall(Uri small) {
        this.small = small;
    }

    public int getPlaceResource() {
        return placeResource;
    }

    public void setPlaceResource(int placeResource) {
        this.placeResource = placeResource;
    }

    public Drawable getPlaceDrawable() {
        return placeDrawable;
    }

    public void setPlaceDrawable(Drawable placeDrawable) {
        this.placeDrawable = placeDrawable;
    }

    private Context context = null;
    private Transform transform = null;
    private Uri small = null;
    private int placeResource = 0;
    private Drawable placeDrawable = null;
}
